๐Ÿ“˜ FlexyKey REST API โ€“ Developer Integration Guide

Welcome to the FlexyKey REST API.
This API allows third-party developers to integrate booking systems, access control systems, and automation platforms with FlexyKey and Evva AirKey units.

The API provides:

This document explains how to authenticate, how to call the endpoints, and how to interpret responses.


๐Ÿ” 1. Authentication & Access Control

The FlexyKey API uses HTTP Basic Authentication.
Your FlexyWeb username and password (API-enabled user) must be sent via the Authorization header:

Authorization: Basic base64(username:password)

Swagger and tools like Postman handle this automatically.

Access Requirement
All API calls are executed in the context of the authenticated user.
To use any API function (control, status, bookings, unit information), the user must belong to the same company that owns the target unit or booking object.
If a user does not have rights, the API returns an access error.


๐ŸŒ 2. Base URL

Production
https://api.flexykey.se/v1/

Swagger documentation
https://api.flexykey.se/v1/swagger


โš™๏ธ 3. Data Format

Example:

2025-11-21T10:21:11Z

๐Ÿ”ง 4. Control API

The Control API allows developers to:


๐Ÿš€ 4.1 Control Output

POST /Control
Send a control command to a FlexyKey unit.

URL:

https://api.flexykey.se/v1/Control

Request body (JSON)
Specify either unitId or serialNumber.
outputNumber can be F1, F2 or X1โ€“X64.
outputAction can be ON, OFF or a pulse value in seconds, 1โ€“99999 (only number, no unit).

Example 1 โ€” Control F1 ON

{ "unitId": 3023, "outputNumber": "F1", "outputAction": "ON" }

Example 2 โ€” Pulse X33 for 60 seconds

{ "serialNumber": "040530585131396", "outputNumber": "X33", "outputAction": "60" }

Response:

{ "status": "OK", "unitId": 3023, "outputNumber": "F1", "outputAction": "ON", "messageId": null }

๐Ÿ“ก 4.2 Get IO Status

GET /Control
Retrieve the current IO state of a unit.

By unitId:

https://api.flexykey.se/v1/Control?unitId=3023

By serial:

https://api.flexykey.se/v1/Control?serialNumber=040530585131396

Response example:

{ "unitId": 3023, "serialNumber": "040530585131396", "statusTimestamp": "2025-11-21 08:14:50", "statusTimestampIso": "2025-11-21T08:14:50Z", "rawStatus": "ASTAT:00----,10,--------------------------------0000--------------------00000000, T1=-- T2=-- T3=-- T7600=42", "inputs": [ { "input": "IN1", "state": "off" }, { "input": "IN2", "state": "off" } ], "fOutputs": [ { "output": "F1", "state": "on" }, { "output": "F2", "state": "off" } ], "xOutputs": [ { "output": "X33", "state": "off" }, { "output": "X34", "state": "off" }, { "output": "X35", "state": "off" }, { "output": "X36", "state": "off" }, { "output": "X57", "state": "off" }, { "output": "X58", "state": "off" }, { "output": "X59", "state": "off" }, { "output": "X60", "state": "off" }, { "output": "X61", "state": "off" }, { "output": "X62", "state": "off" }, { "output": "X63", "state": "off" }, { "output": "X64", "state": "off" } ] }

๐Ÿ“’ 5. Booking API

The Booking API allows applications to:

Example โ€” Create a booking

{ "bookingObjectId": 123, "startDate": "2025-11-21T09:00:00Z", "endDate": "2025-11-21T10:00:00Z", "phone1": "+46701234567" }

Successful responses include a unique bookingId.


๐Ÿ“ฆ 6. Unit Information

Use the Unit endpoints to:

Example โ€” Get information about one specific unit

GET

https://api.flexykey.se/v1/units/5459

Response example

{ "unitId": 5459, "unitType": "FlexyKey", "serialnumber": "173717222150419", "ownPhoneOrID": "07181008738825", "name": "FKV3 test", "softVersion": "09.14", "unitInfo": "Maccess 09.14 Sn: 163717822150480 SIMCOMยงSIM7600E LE11B04SIM7600M21-A T=34 Rssi=30 ESP32-D0WD-V3 F:16 R:4 RssiW=-68 CN:WIFI Build Apr 15 2024 FKV3 Gate", "unitNote": null, "timezoneId": "W. Europe Standard Time", "timezoneInfo": "(UTC+01:00) Amsterdam, Berlin, Bern, Rom, Stockholm, Wien)", "created": "2022-07-06T13:10:14Z" }

Example โ€” List all units

GET

https://api.flexykey.se/v1/units

Response example

[ { "unitId": 2459, "unitType": "FlexyKey", "serialnumber": "163717822150484", "ownPhoneOrID": "07181008778862", "name": "FKV3 testenhet", "softVersion": "09.14", "unitInfo": "Maccess 09.14 Sn: 163717822150480 SIMCOMยงSIM7600E LE11B04SIM7600M21-A T=34 Rssi=30 ESP32-D0WD-V3 F:16 R:4 RssiW=-68 CN:WIFI Build Apr 15 2024 FKV3 Gate", "unitNote": null, "timezoneId": "W. Europe Standard Time", "timezoneInfo": "(UTC+01:00) Amsterdam, Berlin, Bern, Rom, Stockholm, Wien)", "created": "2022-07-06T13:10:14Z" }, { "unitId": 2466, "unitType": "FlexyKey", "serialnumber": "163717822150491", "ownPhoneOrID": "07181008738862", "name": "FKV3 testenhet 2", "softVersion": "09.14", "unitInfo": "Maccess 09.14 Sn: 163717822150496 ? ? T=0 Rssi=? ESP32-D0WD-V3 F:16 R:4 RssiW=-52 CN:WIFI Build May 30 2024 FKV3 Gate", "unitNote": null, "timezoneId": "W. Europe Standard Time", "timezoneInfo": "(UTC+01:00) Amsterdam, Berlin, Bern, Rom, Stockholm, Wien)", "created": "2022-09-06T11:24:27Z" } ]

๐Ÿงพ 7. Logs

FlexyKey logs are available via API for:

(Evva logs are not available.)

Example โ€” Retrieve logs for a unit

GET

https://api.flexykey.se/v1/unitlogs/3023?dateFrom=2025-11-18T07:00:00Z&dateTo=2025-11-27T16:00:00Z

Response example

[ { "serverDate": "2025-11-26T19:18:54Z", "unitDate": "2025-11-26T19:18:00Z", "sourceID": "9000004321", "sourceLabel": "Enskild kod larm pรฅ", "actionLabel": "61", "logMsg": "puls pรฅ X-utgรฅng via telefon/rfid/tangentbord" }, { "serverDate": "2025-11-26T19:19:44Z", "unitDate": "2025-11-26T19:18:00Z", "sourceID": "9000001234", "sourceLabel": "- Saknas -", "actionLabel": "-", "logMsg": "numret finns inte registrerat" }, { "serverDate": "2025-11-27T07:49:46Z", "unitDate": "2025-11-27T07:49:00Z", "sourceID": "Informationslogg", "sourceLabel": "--", "actionLabel": "--", "logMsg": "Omstart av programvara." } ]


๐ŸŽฏ 8. Best Practices


๐Ÿ†˜ 9. Support

FlexAccess AB
https://flexaccess.se
support@flexaccess.se

Please provide: